//package com.example.r2022913.config;
//
//
//import com.example.r2022913.Intercepter.JwtInterceptor;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
//import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
//import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
//
///**
// * 描述：     配置地址映射
// */
//@Configuration
//public class WebMvcConfig implements WebMvcConfigurer {
//
//    //token验证 window客户端
//    @Autowired
//    private JwtInterceptor jwtInterceptor;
//    //访问图片路径映射到本地路径  二维码支付用
////    @Override
////    public void addResourceHandlers(ResourceHandlerRegistry registry) {
////        registry.addResourceHandler("/images/**")
////                .addResourceLocations("file:" + Constant.FILE_UPLOAD_DIR);
////    }
//
//    @Override
//    public void addInterceptors(InterceptorRegistry registry) {
//        registry.addInterceptor(jwtInterceptor)
////                .addPathPatterns("/Administration/user/**")    //拦截所有请求 通过判断token是否合法来决定是否登陆
//                .addPathPatterns("/Administration/**") //拦截后台系统所有请求 只有携带token才能请求成功
//                .excludePathPatterns("/Administration/user/login"); //只放行登录接口
//    }
//
//}
